[
	//initialize some rather useful variables
	var(
		'makerator-version'             = 0.632,
		'pageID'                        = integer, // corresponds to the ID in the table Pages
		'page_name'                     = string, // also from the Pages table
		'gv_error'                      = string, // used for jono's xs_cat tags
		'and'                           = action_param('and'),
		'this_exit'                     = action_param('exit'), //what page to go to when an action is complete
		'show_home_in_navbar'           = false, // whether the main navbar should include a link to /Home/ 
		'auth_disallow_userTypeUIDs'    = array,
		'auth_allow_userTypeUIDs'       = array,
		'err'                           = string,
		'public_content'                = string, // this is the main content string
		
		'css_src_head'                  = array, // an array of pairs of the of the path:media of various CSS files you wish to link to
		'javascripts_src_head'          = array, // insert the paths of the various javascripts you wish to be included in the HTML head
		'javascripts_src_end'           = array, // insert the paths of the various javascripts you wish to be included at the end of the document
		'jquery_scripts'                = array, // insert the code for any javascripts you wish to be included in the end of the document, right beofre the </body>
		'javascripts'                   = array, // insert the code for any javascripts you wish to be included in the end of the document, right beofre the </body>
		'head_insert'                   = string, // this becomes the stuff we stick into the head of the HTML document at teplate rendering time. 
		'very_last_thing_insert'        = string, // this becomes the stuff we stick into the very end of the of the HTML document at teplate rendering time. 
		
		
		'content_code'                  = string,
		'wtf'                           = 'seriously',
		'debug_content'                 = string,
		'admin_toolbar'                 = string, // when an admin is logged in, this presents an attractive and useful 
		'admin_content'                 = string,
		'content_debug'                 = string,
		'debug'                         = action_param('debug'),
		);



	//create an array of the path to the file we're looking at
	var('levels' = (((response_path)->split('/'))->removeall('') &));
	//each of the directories along the way is a "level" in our URI
	
	
	if($levels->size);
			($levels->get(1)) != 'Home' ? $levels->insert('Home', 1);
	else;
			//if we're at home the array is empty, so we insert "home" into it
			$levels = array('Home');
	/if;
	
	
	include('/_Makerator/config.lasso');
	
	protect;
			null(include_raw('/_Site/config.lasso'));
			handle_error;
					$__HTML_REPLY__ += include('/_Makerator/_Installer/error_server_name.html');
					abort;
			/handle_error;
	/protect;
	
	inline($connection_files);
			//load makerator config files
			if(file_exists('/_Site/config.lasso'));
					//load site config files, if they exist
					include('/_Site/config.lasso');
			/if;
			//load makerator custom tags
			include('/_Makerator/_Library/custom_tags.lasso');
			if(file_exists('/_Site/_Library/custom_tags.lasso'));
					//load site custom tags, if they exist
					//include('/_Site/_Library/custom_tags.lasso');
			/if;
	/inline;
	
	inline($connection_files);
			if(file_exists(response_filepath));
					$__HTML_REPLY__ += include(response_filepath);
					abort;
					//if the file that the browser is trying to load actually exists, we'll just serve it, rather than bother running through the entire hub file..
					
					//the URL handler in lassostartup handles this for us anyway, but we have it here JUST IN CASE, since that whole mess can be sort of a pain to set up.
			/if;
	/inline;
	
	
	
	
	
	
	// these plugins are key to Makerator's ease of use.
	/*
		to add a new plugin, simply add a new *empty* directory in 
		/_Site/plugins/
		
		
		then, as a starting point, duplicate the "News" table and name your 
		new table the same as your new Plugin.
		
		Let us suppose you named this new table "Drinks"
		
		if you visit /Drinks/ in the browser, you'll see that you have an instant, mini, application.
		
		you're welcome.
	
	*/
	
	var('plugins'=array);
	inline($connection_files);
			iterate(file_ListDirectory('/_Site/plugins/'), local('x'));
					file_isDirectory(('/_Site/plugins/')#x) ? $plugins->insert(#x);
			/iterate;
			iterate(file_ListDirectory('/_Makerator/plugins/'), local('x'));
					file_isDirectory(('/_Makerator/plugins/')#x) ? $plugins->insert(#x);
			/iterate;
	/inline;
	
	
	
	//this is what is output in the <h2> and the <title> tag
	var('page_title' = ($levels->last));
	var('section' = ($levels->second)); // this section var is useful both for the nav hiliting and for assigning a class to the body tag, in case there are section-specific CSS tricks we want to do
	var('body_id' = $page_title); //similar to seciton, but page-specific -- we save this w/o any of our string manipulations
	$section == '' ? $section = 'Home';
	
	//manipulate the page_title to make a human-friendly string
	$page_title == 'Home' ? $page_title = 'Home';
	$page_title->replace('_and_', '&nbsp&amp;&nbsp;');
	$page_title->replace('~per-cent~', '%');
	$page_title->replace('--', ': ');
	$page_title->replace('~', '&rsquo;');
	$page_title->replace('__', ' / ');
	$page_title->replace('_', ' ');
	var('page_title_base' = ($levels->last)); //this is what *would* have been the title before any errors but after we do the string manipulations
	
	include('/_Makerator/_Library/sessions.lasso');
	
	
	
	
	//var('show_admin_content' = true);// you can uncomment this to over-ride login system  default -- userful for getting and rolling when you're unsure what the hell else to do.
	
	
	
	var('levels_count' = $levels->size);
	loop(
		-from=$levels_count,
		-to=1,
		-by=-1
		);
			var('level_'+loop_count = $levels->get(loop_count));
	/loop;
	
	loop(
		-from=1,
		-to=$levels_count,
		-by=1
		);
			var(
				'loop_count_001'                      =  loop_count,
				'pathTo_level_'+loop_count+'_Array'   =  array,
				'pathTo_level_'+loop_count            =  '/'
				);
			loop($loop_count_001);
					var('loop_count_002' = loop_count);
					if(var('level_'+$loop_Count_002) != 'Home');
							var('pathTo_level_'+$loop_count_001+'_Array')->insert(var('level_'+$loop_count_002),$loop_count_002);
							var('pathTo_level_' $loop_count_001)->(Append:((Var: 'level_' $Loop_Count_002) '/'));
					/If;
			/Loop;
	/Loop;
	var('thisLevel_Name' = var('level_'+$levels_count));
	var('crumbtrail' = string);
	var('loop_Count_001' = 0);
	var('levels_names' = array);
	$crumbtrail += '<ul id="crumbtrail">';
			iterate($levels, var('a_Level'));
					$loop_Count_001 += 1;
					var('a_displayName' = $a_Level);
					$levels_names->insert($a_level);
					var('a_Path' = var('pathTo_level_'+$loop_Count_001));
					if($a_displayName >> '_');
							var('new_displayName' = $a_displayName->split('_'));
							$a_displayName = $new_displayName->join('&nbsp;');
					/if;
					
					
					
					$crumbtrail += '<li>';
							If($loop_count_001 == 1);
									$crumbtrail += '<a href="/Home" title="Go to '+$a_displayName+'" >'+$a_displayName'</a>&nbsp;&gt;&nbsp;';
							else($loop_count_001 != $levels->size);
									$crumbtrail += '<a href="'+$a_Path+'" title="Go to '+$a_displayName+'" >'+$a_displayName'</a>&nbsp;&gt;&nbsp;';
							else;
									$crumbtrail += '<span id="crumbTrail_YouAreHere">'+$a_displayName+'</span>';
							/If;
					$crumbtrail += '</li>';
			/iterate;
	$crumbtrail += '</ul>';
	
	
	
	if((response_path)->beginswith('/_Auth/'));
			Define: -name='loginTries', -default=0;
		
		
			If: (Cookie: '_SignInError') != '';
					Inline: -Session='_SignInError:' + (cookie: '_SignInError');
							Session_Start: -Name='_SignInError', -Expires=$longtermExpiresMinutes, -UseNone, -ID=(Cookie: '_SignInError');
					/inline;
			Else;
					Session_Start: -Name='_SignInError', -Expires=$longtermExpiresMinutes, -UseNone;
			/if;
			Cookie_Set: '_SignInError'=(Session_ID:-Name='_SignInError'),
				-Domain=(Server_Name),
				-Expires=15,
				-Path='/',
				;
			select(true);
				case(string(response_path)->equals('/_Auth/Sign_In/'));
					$public_content += include('/_Makerator/_Library/sign_in_form.lasso');
				case(string(response_path)->beginswith('/_Auth/Sign_In/Do/'));
					$public_content += include('/_Makerator/_Library/process_login.lasso');
				case(string(response_path)->equals('/_Auth/Sign_Out/'));
					$public_content += include('/_Makerator/_Library/cookie_killer.lasso');
					redirect_url('/_Auth/Signed_Out/');
				case(string(response_path)->equals('/_Auth/Sign_Out/Do/'));
					$public_content += include('/_Makerator/_Library/cookie_killer.lasso');
					redirect_url('/_Auth/Signed_Out/');
				case(string(response_path)->equals('/_Auth/Signed_Out/'));
					$public_content += include('/_Makerator/_Library/cookie_killer.lasso');
					$public_content += ('
							<div class="actiontaken">
									<h1 style="color: #999;">
											<img src="/_Assets/Images/icon_success.jpg" alt="[!]" width="23" height="23" valign="bottom">
											You have successfully <span style="color: red;">logged out</span>.</span>
									</h1>
									
									<p>
											Thank you, and come again.
									</p>
							</div>
							');
					$public_content += include('/_Makerator/_Library/sign_in_form.lasso');
			/select;






	else($levels->size > 2 && (response_path)->beginswith('/Admin/') && ((local('fnd') := $plugins->find($levels->get(3)'/')) != array));
			//include('/_Site/plugins/admin-'(($plugins->find($levels->get(3)'/'))->first)'application.lasso');
			if(file_exists('/_Site/plugins/'(($plugins->find($levels->get(3)'/'))->first)'admin.lasso'));
					//app-specific application hub 
					$public_content += include('/_Site/plugins/'(($plugins->find($levels->get(3)'/'))->first)'admin.lasso');
			else(file_exists('/_Site/plugins/admin.lasso'));
					//site-specific application hub (try never to use!)
					$public_content += include('/_Site/plugins/'(($plugins->find($levels->get(3)'/'))->first)'admin.lasso');
			else;
					//the default application hub
					$public_content += include('/_Makerator/plugins/admin.lasso');
			/if;
	











	else((response_path)->beginswith('/Admin/') && $show_admin_content == true);
			$admin_toolbar += '<div id="admincontent">';
			select(true);
			
				case(response_path == '/Admin/Add_Clients/');
					
					$public_content += '<p>add clients is disabled</p>';
					include('/_Assets/add_clients.lasso');
				
				case(response_path == '/Admin/Show_Tree/');
				
					//$public_content += '<code>'+(xs_cat->(fullCatSQL(-cattable='Pages',-xtraReturn='',-xtraWhere='')))+'</code><br>';
					var('treesql'=(xs_cat->(fullCatSQL(-id=1, -cattable='Pages',-orderby='node.lft',-xtrareturn=', node.lft, node.page_url, node.content ', -xtraWhere=' AND node.visible_in_menu = 1 '))));
					$public_content += '<textarea rows="5" cols="40">'+$treesql+'</textarea>';
					inline($connection_db, -sql=$treesql);
							var('lastDepth' = 0);
							//$public_content += '<ul class="catTree">';
							rows;
									var('thisDepth' = integer(column('depth')));
									if($thisDepth > $lastDepth);
											$public_content += '<ol class="catTree">';
									else($thisDepth < $lastDepth);
											var('diff' = ($lastDepth - $thisDepth));
											$public_content += ('</ol>' * $diff);
											
									/if;
									var('path_to_node' = (xs_cat->getURLpath(-id=column('id'), -cattable='Pages')));
									$public_content += '<li>'+$path_to_node+'</a>';
									$public_content += (boolean(column('content')->size) ? '' | ' (No Content)');
									$public_content +='</li>';
									$lastDepth = $thisDepth;
							/rows;
							//$public_content += '</ul>';
					/inline;
					
				case(response_path == '/Admin/Browse_Server/');
						$public_content += include('/_Assets/fckeditor/editor/filemanager/browser/default/browser.lasso?Type=Image&Connector=connectors/lasso/connector.lasso');








				case(response_path == '/Admin/Assign_Site_Sponsor/Do/');
						var('sponsorUID' = action_param('sponsor'));
						//create record if none exists
						inline($connection_db, -sql='SELECT UID FROM Site_Sponsor WHERE UID IS NOT NULL');
								if(found_count == 0);
										var('newUID'=lasso_uniqueid);
										inline(
											$connection_db, 
											-add,
											'UID'=$newUID,
											-table='Site_Sponsor',
											'Gold_Club_Members_UID' = $sponsorUID,
											);
												if(error_msg == 'No Error');
														redirect_url('/Admin/Assign_Site_Sponsor/#saved');
												else;
														$page_title = 'Error';
														$public_content += error_msg;
												/if;
										/inline;
								else;
										rows;
												var('updateUID'=column('UID'));
												inline(
													$connection_db, 
													-update,
													-keyvalue=$updateUID,
													-keyfield='UID',
													-table='Site_Sponsor',
													'Gold_Club_Members_UID' = $sponsorUID,
													);
														if(error_msg == 'No Error');
																redirect_url('/Admin/Assign_Site_Sponsor/#saved');
														else;
																$page_title = 'Error';
																$public_content += error_msg;
														/if;
												/inline;
										/rows;
								/if;
						/inline;
						
						
				case(response_path->beginswith('/Admin/Assign_Site_Sponsor/'));
						inline(
							$connection_db,
							-sql=('
								SELECT this.UID AS Sponsorship_UID,  g.Title AS Sponsor_Title, g.UID AS Sponsor_UID
								FROM 
									Site_Sponsor AS this
									LEFT JOIN Gold_Club_Members AS g ON this.Gold_Club_Members_UID = g.UID
								
								'),
							-table='Pages',
							);
							
								//$public_content += action_Statement;
								if(error_msg != 'No Error');
										$page_title = 'Error';
										$public_content += '<p>'+error_msg+'</p>';
								else;
										//display the editor
										rows;
											var('Sponsor_UID' = column('Sponsor_UID'));
											var('Sponsor_Title' = column('Sponsor_Title'));
										/rows;
										//$public_content += '<p>sponsor UID: ' $Sponsor_UID'</p>';
										$page_title = 'Editing the Sponsorship of the website';
										$public_content += @include('/_Makerator/_Library/admin_Assign_Site_Sponsor.lasso');
								/if;
						/inline;







				case(response_path == '/Admin/Assign_Sponsor_to_Page/Do/');
						var('pageID' = action_param('pageID'));
						var('sponsorUID' = action_param('sponsor'));
						
						
						//create record if none exists
						inline($connection_db, -sql='SELECT UID FROM Pages__Gold_Club_Members WHERE Pages_ID ='$pageID';');
								if(found_count == 0);
										var('newUID'=lasso_uniqueid);
										inline(
											$connection_db, 
											-add,
											'UID'=$newUID,
											-table='Pages__Gold_Club_Members',
											'Pages_ID'=$pageID,
											'Gold_Club_Members_UID' = $sponsorUID,
											);
												if(error_msg == 'No Error');
														redirect_url('/Admin/Assign_Sponsor_to_Page/Page-'+$pageID'/#saved');
												else;
														$page_title = 'Error';
														$public_content += error_msg;
												/if;
										/inline;
								else;
										rows;
												var('updateUID'=column('UID'));
												inline(
													$connection_db, 
													-update,
													-keyvalue=$updateUID,
													-keyfield='UID',
													-table=$table_prefix 'Pages__Gold_Club_Members',
													'Gold_Club_Members_UID' = $sponsorUID,
													);
														if(error_msg == 'No Error');
																redirect_url('/Admin/Assign_Sponsor_to_Page/Page-'+$pageID'/#saved');
														else;
																$page_title = 'Error';
																$public_content += error_msg;
														/if;
												/inline;
										/rows;
								/if;
						/inline;
						
						
				case(response_path->beginswith('/Admin/Assign_Sponsor_to_Page/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Assign_Sponsor_to_Page/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('saved'=false);
						$saved=boolean($virtual_params->find('Saved'));
						$saved == true ? $virtual_params->removeall('Saved');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						if($pageID != '');
								inline(
									$connection_db,
									-sql=('
										SELECT this.UID AS Sponsorship_UID,  g.Title AS Sponsor_Title, g.UID AS Sponsor_UID, sc.name
										FROM 
											' $table_prefix 'Pages__Gold_Club_Members AS this
											RIGHT JOIN ' $table_prefix 'Pages AS sc ON this.' $table_prefix 'Pages_id = sc.id 
											LEFT JOIN ' $table_prefix 'Gold_Club_Members AS g ON this.' $table_prefix 'Gold_Club_Members_UID = g.UID
										
										WHERE sc.id = '+$pageID
										),
									-table=$table_prefix 'Pages',
									);
										if(error_msg != 'No Error');
												$page_title = 'Error';
												$public_content += '<p>'+error_msg+'</p>';
										else;
												//display the editor
												rows;
													var('page_name' = column('name'));
													var('Sponsorship_UID' = column('Sponsorship_UID'));
													var('Sponsor_UID' = column('Sponsor_UID'));
													var('Sponsor_Title' = column('Sponsor_Title'));
												/rows;
												$page_title = 'Editing the Sponsorship of of &ldquo;'+$page_name+'&rdquo;';
												$public_content += @include('/_Makerator/_Library/admin_page_Assign_Sponsor_to_Page.lasso');
										/if;
								/inline;
						else;
							$page_title = 'Error: No Page ID Specified';
							$admin_toolbar += 'You need to specifiy a page ID to edit.';
						
						/if;






				case(response_path == '/Admin/Select_Tree/');
						include('/_Makerator/_Library/admin_select_tree.lasso');

					
					
				case(response_path == '/Admin/Site_Refresh/');
				
						var('tables'=array);
						admin_reloaddatasource(4);
						admin_refreshsecurity;
						inline(-database=$siteDB);/inline;
						$navbarout = string;
				
				case((response_path)->beginswith('/Admin/Move_Page_to_Bottom/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Move_Page_to_Bottom/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('saved'=false);
						$saved=boolean($virtual_params->find('Saved'));
						$saved == true ? $virtual_params->removeall('Saved');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						
						var('newPlace' = (xs_cat->getparent(-cattable='Pages', -id=$pageID))->find('id'));
						xs_cat->moveNodeTo(-cattable='Pages',-id=$pageID, -newparent=$newPlace);
						$public_content += error_msg;
						$navbarout = string;
						redirect_url('/Admin/Site_Map/#'$pageID);
					
					
				/*
				case((response_path)->beginswith('/Admin/Move_Page_to_Top/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Move_Page_to_Top/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('saved'=false);
						$saved=boolean($virtual_params->find('Saved'));
						$saved == true ? $virtual_params->removeall('Saved');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						
						var('newPlace' = (xs_cat->getparent(-cattable='Pages', -id=$pageID))->find('id'));
						xs_cat->moveNodeTo(-cattable='Pages',-id=$pageID, -newparent=$newPlace);
						$public_content += error_msg;
						redirect_url('/Admin/Site_Map/#'$pageID);
						
				*/
						
					
				case((response_path)->beginswith('/Admin/Move_Page_Down/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Move_Page_Down/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('saved'=false);
						$saved=boolean($virtual_params->find('Saved'));
						$saved == true ? $virtual_params->removeall('Saved');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						
						var('newPlace' = (xs_cat->getparent(-cattable='Pages', -id=$pageID))->find('id'));
						xs_cat->moveNodeTo(-cattable='Pages',-id=$pageID, -newparent=$newPlace);
						$public_content += error_msg;
						$navbarout = string;
						redirect_url('/Admin/Site_Map/#'$pageID);
						
						
						
				case((response_path)->beginswith('/Admin/Move_Page_Up/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Move_Page_Up/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('saved'=false);
						$saved=boolean($virtual_params->find('Saved'));
						$saved == true ? $virtual_params->removeall('Saved');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						
						xs_cat->moveNode(-cattable='Pages',-id=$pageID);
						
						$public_content += error_msg;
						$navbarout = string;
						redirect_url('/Admin/Site_Map/#'$pageID);
						
						
				case(response_path == ('/Admin/Move_Page_To/Do/'));
						var('thisID' = action_param('page'));
						var('newPlace' = action_param('newparent'));
						
						xs_cat->moveNodeTo(-cattable='Pages',-id=$thisID, -newparent=$newPlace);
						$public_content += error_msg;
						$navbarout = string;
						redirect_url('/Admin/Site_Map/#'$thisID);
						
						
				case((response_path)->beginswith('/Admin/Move_Page_To/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Move_Page_To/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('saved'=false);
						$saved=boolean($virtual_params->find('Saved'));
						$saved == true ? $virtual_params->removeall('Saved');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						if($pageID != '');
								//lookup page to delete info for instructions
								var('getinfo'='SELECT lft, rgt, name, page_url FROM Pages WHERE id = '+$pageID+';');
								inline($connection_db, -sql=$getinfo);
										rows;
												var('a_url'=column('page_url'));
												var('a_name'=column('name'));
												var('a_lft'=column('lft'));
												var('a_rgt'=column('rgt'));
										/rows;
								/inline;
								var('path_to_node' = (xs_cat->getURLpath(-id=$pageid, -cattable='Pages')));
								!$path_to_node->beginswith('/') ? ($path_to_node = ('/' + $path_to_node));
								var('exit_page_url' = action_param('page_url'));
								$page_title = 'Move the page(s)?';
								
								$public_content += '
									<div class="warning"><p>You have chosen to move the page &ldquo;<strong><a href="'+$path_to_node+'">'+$a_name+'</a></strong> &rdquo; and <em>there is NO undo</em>  (unless you decide to move it back, of course).</p></div><div class="instructions">
									<p>Note that deleting this page will also move ALL of its children, so if you do not wish to move them, you need to move them somewhere else, first.</p>
									<h3>If you are sure</h3>
									<p>If you wish to continue, select the new <em>parent page</em> of the page(s) you wish to move, then click &ldquo;Yes, move them&rdquo;</p>
									</div>
									<form action="/Admin/Move_Page_To/Do/" method="post" style="display: inline;">
										<input name="page" id="page" type="hidden" value="'+$pageID+'">
										<input name="page_url" id="page_url" type="hidden" value="'+$exit_page_url+'">
										<input name="target" id="target" type="hidden" value="'+action_param('target')+'">';
										$public_content += include('/_Makerator/_Library/admin_select_tree.lasso');
										$public_content += '<button type="submit" id="createpage" value="Yes, move them">
											Yes, move them
										</button>
										<button 
											name="-Nothing" 
											value="Site Map" 
											onclick="javascript:window.location=(\'/Admin/Site_Map/#'$pageID'\'); return false;"
											>No, Cancel</button>
									</form>

								</div>';
						else;
								$page_title = 'Error';
								$public_content += '<p>You need to choose a page to move, or we cannot move one.</p>';
						/if;
				
						
					
						
				case(response_path == '/Admin/Site_Map/');
						$navbarout = string;
						include('/_Makerator/_Library/admin_site_map.lasso');
					
					
				case(response_path == '/Admin/Delete_Page/Do/');
						if(action_param('page'));
								var('pageID' = action_param('page'));
								var('get_parentID' = 'SELECT * FROM Pages WHERE id = "' + $pageID + '"');
								
								//'<p>this: '$this'</p>';
								//'<pre>'$get_parentID'</pre>';
								inline($connection_db, -sql=$get_parentID);
										if(found_count == 1);
												rows;
													var('parentID' = column('id'));
												/rows;
										else;
													var('parentID' = (''));
										/if;
								/inline;
									xs_cat->(deleteNode(-cattable='Pages',-id=$pageID));
									
									if($gv_error != '');
											// this page does not exist
											$page_title = 'Error';
											$admin_toolbar += '<p>'+$gv_error+'</p>';
											$admin_toolbar += '<p>'+$pageID+'</p>';
									else;
											$navbarout = string;
											redirect_url('/Admin/Site_Map/'+'#'+$parentID);
									/if;
						/if;
						
						
						
				case((response_path)->beginswith('/Admin/Delete_Page/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Delete_Page/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('saved'=false);
						$saved=boolean($virtual_params->find('Saved'));
						$saved == true ? $virtual_params->removeall('Saved');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						if($pageID != '');
								//lookup page to delete info for instructions
								var('getinfo'='SELECT name, page_url FROM Pages WHERE id = '+$pageID+';');
								inline($connection_db, -sql=$getinfo);
										rows;
												var('a_name'=column('name'));
										/rows;
								/inline;
								var('path_to_node' = (xs_cat->getURLpath(-id=$pageID, -cattable='Pages')));
								$page_title = 'Delete the page?';
								
								$public_content += '
									<div class="warning"><p>You have chosen to delete the page &ldquo;'+$a_name+'&rdquo; and <em>there is NO</em> undo.</p></div>
									<div class="instructions">
									<p>Note that deleting this page will also delete ALL of its children.</p>
									<p>Are you sure you wish to continue?</p>
									</div>
									<form action="/Admin/Delete_Page/Do/" method="post" style="display: inline;">
										<input name="page" id="page" type="hidden" value="'+$pageID+'">
										<button type="submit" id="createpage" value="Yes, Delete">
											Yes, Delete
										</button>
									<button 
												name="-Nothing" 
												value="No, Cancel" 
												onclick="javascript:window.location=(\''+$path_to_node+'\'); return false;"
												>No, Cancel</button>
									</form>
								</div>';
						/if;
				
				
				case(response_path == '/Admin/Edit_Content/Do/');
						var('pageID' = action_param('pageID'));
						var('new_group' = action_param('group'));
						var('new_template' = action_param('template'));
						var('page_content' = action_param('content'));
						inline(
							$connection_db, 
							-update,
							-keyvalue=$pageID,
							-keyfield='id',
							-table='Pages',
							'content'=$page_content,
							'template'=$new_template,
							'visible_in_menu'=$new_group
							);
								if(error_msg == 'No Error');
										redirect_url('/Admin/Edit_Content/Page-'+$pageID+'/#saved');
								else;
										$page_title = 'Error';
										$public_content += error_msg;
								/if;
						/inline;
				case(response_path == '/Admin/Change_URL/Do/');
						var('pageID' = action_param('pageID'));
						var('page_url' = action_param('page_url'));
						$page_url->contains('/') && $page_url !>> 'http://' ? $page_url->removeall('/') | '';
						inline(
							$connection_db, 
							-update,
							-keyvalue=$pageID,
							-keyfield='id',
							-table='Pages',
							'page_url'=$page_url,
							);
								if(error_msg == 'No Error');
										$navbarout = string;
										redirect_url('/Admin/Change_URL/Page-'+$pageID+'/#saved');
								else;
										$page_title = 'Error';
										$public_content += error_msg;
								/if;
						/inline;
				case(response_path->beginswith('/Admin/Change_URL/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Move_Page_To/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('saved'=false);
						$saved=boolean($virtual_params->find('Saved'));
						$saved == true ? $virtual_params->removeall('Saved');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						if($pageID != '');
								inline(
									$connection_db,
									-sql=('SELECT page_url, name FROM Pages WHERE id = '+$pageID),
									-table='Pages',
									);
									
									
									
									if(error_msg != 'No Error');
											$page_title = 'Error';
											$public_content += '<p>'+error_msg+'</p>';
									else;
											//display the editor
											rows;
												var('page_name' = column('name'));
												var('page_url' = column('page_URL'));
											/rows;
											$page_title = 'Editing URL of &ldquo;'+$page_name+'&rdquo;';
											$public_content += @include('/_Makerator/_Library/admin_url_change_form.lasso');
									/if;
								/inline;
						else;
							$page_title = 'Error: No Page ID Specified';
							$public_content += '<div class="warning"><p>You need to specifiy a page ID to edit.</p>';
							$public_content += include('/_Makerator/_Library/admin_links.lasso') + '</div>';

						
						/if;
				case(response_path == '/Admin/Rename_Page/Quick/');
						var('pageID' = action_param('page_ID'));
						var('page_name' = action_param('content'));
						inline(
							$connection_db, 
							-update,
							-keyvalue=$pageID,
							-keyfield='id',
							-table='Pages',
							'name'=$page_name,
							);
								if(error_msg == 'No Error');
										$navbarout = string;
										$__HTML_REPLY__ = 'You sucsefully changed the title of this pgae to"'+$page_name+'". You will need to refresh the page to see changes in the navbar.';
										abort;
								else;
										$__HTML_REPLY__ = error_msg;
										abort;
								/if;
						/inline;
				case(response_path == '/Admin/Rename_Page/Do/');
						var('pageID' = action_param('pageID'));
						var('page_name' = action_param('page_name'));
						inline(
							$connection_db, 
							-update,
							-keyvalue=$pageID,
							-keyfield='id',
							-table='Pages',
							'name'=$page_name,
							);
								if(error_msg == 'No Error');
										$navbarout = string;
										redirect_url('/Admin/Rename_Page/Page-'+$pageID);
								else;
										$page_title = 'Error';
										$public_content += error_msg;
								/if;
						/inline;
				case(response_path->beginswith('/Admin/Rename_Page/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Move_Page_To/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('saved'=false);
						$saved=boolean($virtual_params->find('Saved'));
						$saved == true ? $virtual_params->removeall('Saved');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						if($pageID != '');
								inline(
									$connection_db,
									-sql=('SELECT page_url, name FROM Pages WHERE id = '+$pageID),
									-table='Pages',
									);
									
									
									
									if(error_msg != 'No Error');
											$page_title = 'Error';
											$public_content += '<p>'+error_msg+'</p>';
									else;
											//display the editor
											rows;
												var('page_name' = column('name'));
											/rows;
											$page_title = 'Editing name of &ldquo;'+$page_name+'&rdquo;';
											$public_content += @include('/_Makerator/_Library/admin_page_renamer.lasso');
									/if;
								/inline;
						else;
							$page_title = 'Error: No Page ID Specified';
							$admin_toolbar += 'You need to specifiy a page ID to edit.';
						
						/if;
				case(response_path == '/Admin/Create_Page/');
					
					// make sure we have an imcoming URL to create
					if(action_param('parent') != '' && action_param('page_url') != '');
							var('parentID' = action_param('parent'));
							var('new_page_url' = action_param('page_url'));
							//$new_page_url->endswith('/') ? $new_page_url->remove('/');
							var('new_page_title' = action_param('title'));
							var('sql' = 'SELECT * FROM Pages WHERE page_url = "' + ($new_page_url) + '"');
							inline($connection_db, -sql=$sql);
									var('new_page_found' = found_count);
							/inline;
							
							
							
							
							if($new_page_found >= 1);
							
									// this page exists
									// don't do nothing
									/*
									$page_title = 'Error: Page Already Exists';
									$public_content += '<p>You have asked to create a page that already exists.</p>';
									$public_content += '<p>Would you prefer to <a href="/Admin/Edit_Content/?pageid=' $parentID '">edit the page instead</a>?.</p>';
									*/
									
									// the above is an option -- maybe the option you want?
									
									// down below the hub is smart enough to sort out "duplicate" pages, so it's no biggee to have them the same here.
									
									// your choice
									xs_cat->addChild(
										-cattable='Pages',
										-txt=$new_page_title, 
										-othersmap=map(
											'page_url'=$new_page_url, 'visible_in_menu'=0,
											),
										-id=$parentID
										);
									
									
									
									if($gv_error != '');
											// this page does not exist
											$page_title = 'Error';
											$admin_toolbar += '<p>'+$gv_error+'</p>';
											$admin_toolbar += '<p>'+$parentID+'</p>';
									else;
											$navbarout = string;
											redirect_url(referer_url);
									/if;
									
									// this page does not exist
									$page_title = 'Created Page';

							else;
									
									xs_cat->addChild(
										-cattable='Pages',
										-txt=$new_page_title, 
										-othersmap=map(
											'page_url'=$new_page_url, 'visible_in_menu'=0,
											),
										-id=$parentID
										);
									
									
									
									if($gv_error != '');
											// this page does not exist
											$page_title = 'Error';
											$admin_toolbar += '<p>'+$gv_error+'</p>';
											$admin_toolbar += '<p>'+$parentID+'</p>';
									else;
											$navbarout = string;
											redirect_url(referer_url);
									/if;
									
									// this page does not exist
									$page_title = 'Created Page';
									
									
									//$admin_toolbar += include('/_Makerator/_Library/page_creation.lasso');
							
							/if;
							
							
					else(action_param('parent') == '');
						$page_title = 'Error: No Parent Specified';
						$admin_toolbar += 'You need to specifiy a Parent ID.';
						
					else(action_param('parent') == '');
						$page_title = 'Error: No URL Specified';
						$admin_toolbar += 'You need to specifiy a URL.';
					
					/if;
				case((response_path)->beginswith('/Admin/Edit_Content_Ajax/'));
						var('pageID' = action_param('page_ID'));
						var('page_content' = action_param('content'));
						
						if(action_param('page_id') == '');
								$__HTML_REPLY__ = 'No Page ID Secified';
								abort;
						/if;
						
						inline(
							$connection_db, 
							-update,
							-keyvalue=$pageID,
							-keyfield='id',
							-table='Pages',
							'content'=$page_content,
							);
								if(error_msg == 'No Error');
										$__HTML_REPLY__ = 'Save successful!';
										abort;
								else;
										$page_title = 'Error';
										$public_content += error_msg;
								/if;
						/inline;
						
						
				case((response_path)->beginswith('/Admin/Toggle_Visibility/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Toggle_Visibility/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('new_visibility'=integer);
						var('is_show'=boolean, 'is_hide'=boolean);
						$is_show = boolean($virtual_params->find('Show'));
						$is_show == true ? $virtual_params->removeall('Show');
						$is_hide = boolean($virtual_params->find('Hide'));
						$is_hide == true ? $virtual_params->removeall('Hide');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						
						
						$new_visibility = (boolean($is_show) ? 1 | 0);
						
						//$public_content += $pageID;
						
						
						if($pageID != '');
								inline(
									$connection_db,
									-update,
									-keyfield='id',
									-keyvalue=$pageID,
									-table='Pages',
									'visible_in_menu'=$new_visibility,
									);
									
									
									
									if(error_msg != 'No Error');
											$page_title = 'Error';
											$admin_toolbar += '<p>'+error_msg+'</p>';
									else;
											$public_content += 'New Visibility: ' $new_visibility;
											$navbarout = string;
											redirect_url('/Admin/Site_Map/#'$pageID);
									/if;
								/inline;
						else;
							$page_title = 'Error: No Page ID Specified';
							$admin_toolbar += 'You need to specifiy a page ID.';
						
						/if;
						
				case((response_path)->beginswith('/Admin/Edit_Content/'));
						var('virtual_params' = response_path);
						$virtual_params->removeleading('/Admin/Edit_Content/');
						$virtual_params = ((($virtual_params)->split('/'))->removeall('') &);
						var('saved'=false);
						var('markdown'=false);
						$markdown=boolean($virtual_params->find('Simple'));
						$saved=boolean($virtual_params->find('Saved'));
						$saved == true ? $virtual_params->removeall('Saved');
						iterate($virtual_params, var('a_param'));
								$a_param->beginswith('Page-') ? $pageID = $a_param->split('-')->last;
						/iterate;
						if($pageID != '');
								var('pageURL' = string);
								var('page_content' = action_param('content'));
								inline(
									$connection_db,
									-sql=('SELECT page_url, name, content FROM Pages WHERE id = '+$pageID),
									-table='Pages',
									);
									
									
									
									if(error_msg != 'No Error');
											$page_title = 'Error';
											$admin_toolbar += '<p>'+error_msg+'</p>';
									else(found_count != 1);
											$page_title = 'Error: No Page Specified';
											$public_content += '<p>The system is unable to edit a page, if it is not told which page to edit.</p>';
									else;
											//display the editor
											$page_content = string;
											rows;
												var('page_name' = column('name'));
												$page_title = 'Editing: &ldquo;'+$page_name+'&rdquo;';
												var('pageurl' = column('page_URL'));
												column('content') != '' ? $page_content = column('content') | $page_content = '';
											/rows;
											$public_content += ($markdown == true ? @include('/_Makerator/_Library/markdown_editor.lasso') | @include('/_Makerator/_Library/content_editor.lasso'));
									/if;
								/inline;
						else;
							$page_title = 'Error: No Page ID Specified';
							$admin_toolbar += 'You need to specifiy a page ID to edit.';
						
						/if;
				case;

						//$page_title = 'Error: No Admin Function Exists';
						//$public_content += '<div class="warning">There is not (yet?) an admin function to perform this action.</div>';
						var('t'= $plugins);
						//$t->merge($Relationships);
						iterate($t, local('a_plugin'));
								if: loop_count == 1;
										$public_content += '\r\r<ol class="results-listing" >\r\r';
								/if;
								var: 'rowClass' = 'alt';
								If((Loop_Count) % 2);
										$rowClass = 'normal';
								/If;
								!#a_plugin->beginswith('.svn') && !#a_plugin->beginswith('default')  ? $public_content += '\r\t\t\t<li><a href="/Admin/'#a_plugin'">'(#a_plugin->removetrailing('/')&)'</a></li>';
								if: loop_count == $t->size;
										$public_content += '<li><a href="/Admin/Site_Map/">Site Map</a></li>';
										//$public_content += '<li><a href="/Admin/Show_Tree/">Site Site Tree</a></li>';
										$public_content += '<li><a href="/Admin/Site_Refresh/">Refresh Navbar</a></li>';
										$public_content += '<li><a href="/_Auth/Sign_Out//">Sign Out</a></li>';
										//$public_content += '<li><a href="/Admin/Assign_Site_Sponsor/">Site Sponsor</a></li>';
										$public_content += '</ol>';
								/if;
						/iterate;
			/select;

	else($show_admin_content == false && (response_path)->beginswith('/Admin/'));
			
			var('page_title_base' = $page_title);
			$page_title = 'Oops! File Not Found (404)';
			$public_content += '<p>The page you are looking for appears not to exist.</p>';
	
	
	
	
	
	else($levels->size > 1 && (response_path)->beginswith('/') && ((local('fnd') := $plugins->find($levels->get(2)'/')) != array));
			var('level_to_get' = 2);
			var('this_plugin' = (((($plugins->find($levels->get($level_to_get)'/'))->first))->removetrailing('/')&));
			
			var('sql'=string);
			$sql += 'SELECT s.page_url, s.name, s.id, s.content FROM Pages AS s WHERE UCASE(s.page_url) = UCASE("' + $thisLevel_Name + '")';
			inline($connection_db, action_params, -sql=$sql);
			//'<pre>'$sql'</pre>';
			//$public_content += found_count;
				if(found_count >= 1);
						var('show_page_create'=boolean);
						rows;
								var('thisURLpath' =  (xs_cat->getURLpath(-id=column('id'), -cattable='Pages')));
								($thisURLpath == '/') || ($thisURLpath == '/Home') ? $thisURLpath = '/Home';
								//$public_content += $thisURLpath;
								if(response_path >> $thisURLpath+'/');
										$show_page_create=false;
										var('pageID' = column('id'));
										var('page_name' = column('name'));
										var('pageurl' = column('page_url'));
										//var('page_content' = column('content'));
								/if;
						/rows;
				/if;
			/inline;

			
			
			var(
				'these'=($this_plugin),
				'this'=($this_plugin),
				);
			
			$this->removetrailing('s');
			Var: 'rewAction' = ('rewAction_Blah'); 
			var(($rewAction + '_pathTo')='/'$this_plugin'/');
			
			include('/_Makerator/_Library/REW_Initialization.lasso');
			
			
			if(file_exists('/_Site/plugins/'(($plugins->find($levels->get($level_to_get)'/'))->first)'plugin.lasso'));
					//custom plugin hub (try never to use!)
					$public_content += include('/_Site/plugins/'(($plugins->find($levels->get($level_to_get)'/'))->first)'public.lasso');
			else(file_exists('/_Site/plugins/plugin.lasso'));
					//custom plugin hub (try never to use!)
					$public_content += include('/_Site/plugins/public.lasso');
			else;
					//the default plugin hub
					$public_content += include('/_Makerator/plugins/public.lasso');
			/if;
			
			
			
			
			$admin_toolbar += '<div id="admincontent">';
			$admin_toolbar += include('/_Makerator/_Library/admin_links.lasso');
			//$admin_toolbar += include('/_Makerator/_Library/edit_this_page.lasso');
			$admin_toolbar += include('/_Makerator/_Library/admin_toggle_page_visibility.lasso');
			//$admin_toolbar += include('/_Makerator/_Library/admin_button_changeURL.lasso');
			$admin_toolbar += include('/_Makerator/_Library/admin_button_renamePage.lasso');
			$admin_toolbar += include('/_Makerator/_Library/admin_button_assign_sponsor_to_page.lasso');
			//$admin_toolbar += include('/_Makerator/_Library/admin_button_deletePage.lasso');
			$admin_toolbar += include('/_Makerator/_Library/admin_links.lasso');
			
	else($levels->size > 2 && (response_path)->beginswith('/About/') && ((local('fnd') := $plugins->find($levels->get(3)'/')) != array));
			var('level_to_get' = 3);
			var('this_plugin' = (((($plugins->find($levels->get($level_to_get)'/'))->first))->removetrailing('/')&));
			
			var(
				'these'=($this_plugin),
				'this'=($this_plugin),
				);
		
			$this->removetrailing('s');
			Var: 'rewAction' = ('rewAction_Blah'); 
			var(($rewAction + '_pathTo')='/About/'$this_plugin'/');
			include('/_Makerator/_Library/REW_Initialization.lasso');
			if(file_exists('/_Site/plugins/'(($plugins->find($levels->get($level_to_get)'/'))->first)'public.lasso'));
					//custom application hub (try never to use!)
					$public_content += include('/_Site/apps_public/'(($plugins->find($levels->get($level_to_get)'/'))->first)'public.lasso');
			else;
					//the default application hub
					$public_content += include('/_Site/plugins/public.lasso');
			/if;
			$admin_toolbar += '<div id="admincontent">';
			$admin_toolbar += include('/_Makerator/_Library/admin_links.lasso');

	else((response_path)->contains('/Photos/'));
			$page_title = 'Photo Gallery';
			$public_content += include('/_Site/About__Photos.lasso');


	else;

			//search for page in dB
			var('sql' = string);
			if($thisLevel_Name != 'Home');
					$sql += 'SELECT s.template, s.page_url, s.name, s.id, s.content FROM Pages AS s WHERE UCASE(s.page_url) = UCASE("' + $thisLevel_Name + '")';
			else;
					$sql += 'SELECT s.template, s.page_url, s.name, s.id, s.content FROM Pages AS s ORDER BY s.lft LIMIT 1';
			/if;
			inline($connection_db, action_params, -sql=$sql);
				//$__HTML_REPLY__ += '<pre>'$sql'</pre>';
				//abort;
			
				//$__HTML_REPLY__ += found_count;
				//abort;
				if(found_count >= 1);


						var('show_page_create'=false);
						rows;
								var('thisURLpath' =  (xs_cat->getURLpath(-id=column('id'), -cattable='Pages')));
								
								$thisURLpath->beginswith('//') ? $thisURLpath->removeleading('//');
								!$thisURLpath->beginswith('/') ? $thisURLpath = '/' $thisURLpath;
								
								($thisURLpath == '/') ||($thisURLpath == '/') || ($thisURLpath == '/Home') ? $thisURLpath = '/Home/';
								/*$__HTML_REPLY__ += '<br>URL Path: '$thisURLpath;*/
								/*$__HTML_REPLY__ += '<br>';*/
								/*$__HTML_REPLY__ += '<br>response_path: 'response_path;*/
								/*$__HTML_REPLY__ += '<br>';*/
								/*$__HTML_REPLY__ += '<br>are they equal?  ' (response_path == $thisURLpath);*/
								/*//abort;*/
								if($thisURLpath == response_path);
										$show_page_create=false;
										
										/*$__HTML_REPLY__ += 'do not create page';*/
										
										
										var('pageID' = column('id'));
										var('templateID' = column('template'));
										
										inline(-sql='SELECT name FROM templates WHERE id='$templateID);
											/*$__HTML_REPLY__ += '<br>Find template: ' error_msg;*/
											if(found_count == 1);
												rows;
														var('template' = column('name'));
												/rows;
											else;
											/if;
										/inline;
			
										
										var('page_name' = column('name'));
										var('pageurl' = column('page_url'));
										var('page_content' = column('content'));
										$page_title = string(column('name'));
										
										$public_content += @(string(column('content')));
										var('path_to_page' = (xs_cat->getURLpath(-id=$pageID, -cattable='Pages')));
										//$public_content += $path_to_page;
										if((response_path)->beginswith('/Admin/'));
												$admin_toolbar += '<div id="admincontent">';
										else((response_path)->beginswith('/Home/'));
												$admin_toolbar += '<div id="admincontent">';
												$admin_toolbar += include('/_Makerator/_Library/admin_links.lasso');
												$admin_toolbar += include('/_Makerator/_Library/edit_this_page.lasso');
										else;
												$admin_toolbar += '<div id="admincontent">';
												$admin_toolbar += include('/_Makerator/_Library/edit_this_page.lasso');
												$admin_toolbar += include('/_Makerator/_Library/admin_toggle_page_visibility.lasso');
												$admin_toolbar += include('/_Makerator/_Library/admin_button_changeURL.lasso');
												$admin_toolbar += include('/_Makerator/_Library/admin_button_renamePage.lasso');
												//$admin_toolbar += include('/_Makerator/_Library/admin_button_assign_sponsor_to_page.lasso');
												$admin_toolbar += include('/_Makerator/_Library/admin_button_deletePage.lasso');
												$admin_toolbar += include('/_Makerator/_Library/admin_links.lasso');
												
										/if;
										$show_page_create == false ? loop_abort;
								else;
										var('path_to_page'=response_path);
										$show_page_create = true;
								/if;
								
						/rows;
						if($show_page_create == true);
							// this page does not exist
							var('page_title_base' = $page_title);
							$page_title = 'Oops! File Not Found (404)';
							$public_content += '<div class="warning"><p>The page you are looking for appears not to exist.</p></div>';
							
						
							if(!(response_path)->beginswith('/Admin/'));
									$admin_content += include('/_Makerator/_Library/page_create_form.lasso');
							/if;
						/if;
				else;




						// this page does not exist
						var('path_to_page'=response_path);
						var('page_title_base' = $page_title);
						$page_title = 'Oops! File Not Found (404)';
							$public_content += '<div class="warning"><p>The page you are looking for appears not to exist.</p></div>';
						
						
						//if(!(response_path)->beginswith('/Admin/'));
								$admin_content += include('/_Makerator/_Library/page_create_form.lasso');
						///if;
				/if;
			/inline;
	/if;
	
	if(response_path->beginswith('/Admin/') && $show_admin_content == true);
			$admin_toolbar += include('/_Makerator/_Library/admin_links.lasso');
			var('template' = 'admin');
	/if;

	
	$show_admin_content ? $admin_toolbar += '</div>';
	string(response_path)->beginswith('/Admin/') ? $css_src_head->insert(pair('/_Makerator/css/admin.css'='screen,projection'));
	$show_admin_content ? $css_src_head->insert(pair('/_Makerator/css/admin_toolbar.css'='screen,projection'));

	local('x');
	if($css_src_head->size);
			iterate($css_src_head, #x);
					 $head_insert += '<link rel="stylesheet" href="' #x->first'" type="text/css" media="'#x->second'">\r';
			/iterate;
	/if;
	
	if($javascripts_src_head->size);
			iterate($javascripts_src_head, #x);
					$head_insert += '<script type="text/javascript" src="'#x'"></script>\r';
			/iterate;
	/if;
	
	$show_admin_content ? $javascripts_src_end->insert('/_Makerator/scripts/parseuri.js');
	if($javascripts_src_end->size);
			iterate($javascripts_src_end, #x);
					$very_last_thing_insert += '<script type="text/javascript" src="'#x'"></script>\r';
			/iterate;
	/if;
	
	$show_admin_content ? $javascripts->insert('

				if ((parseUri(window.location.href).anchor) == \'saved\') {
				document.write((\'<div id="saved" class="Makerator-message"><strong>Saved<\/strong> <\/div>\'));
				window.location.href = \'' + response_path + '#edit\';
				};
				if ((parseUri(window.location.href).anchor) == \'deleted\') {
				document.write((\'<div id="deleted"  class="Makerator-message"><strong>Deleted<\/strong> <\/div>\'));
				window.location.href = \'' + response_path + '#top\';
				};
				if ((parseUri(window.location.href).anchor) == \'added\') {
				document.write((\'<div id="added"  class="Makerator-message"><strong>Added<\/strong> <\/div>\'));
				window.location.href = \'' + response_path + '#top\';
				};
		');
	$show_admin_content ? $jquery_scripts->insert('
				$("div#saved").ready(function(){
					$("div#saved").fadeOut(2200,function(){
					$("#editor").slideDown(200);
					});
				});
					
				$("div#deleted").ready(function(){
					$("div#deleted").fadeOut(2000,function(){
					});
				});
				$("div#added").ready(function(){
					$("div#added").fadeOut(2000,function(){
					});
				});
				
				$("div#"+(parseUri(window.location.href).anchor)).ready(function(){
					$("div#"(parseUri(window.location.href).anchor)).fadeOut(100,function(){
					});
				});
		');

	if($jquery_scripts->size);
			$very_last_thing_insert += '<script type="text/javascript">';
			$very_last_thing_insert += '$(document).ready(function(){ ';
			iterate($jquery_scripts, #x);
					$very_last_thing_insert += #x '\r';
			/iterate;
			$very_last_thing_insert += '});';
			$very_last_thing_insert += '</script>';
	/if;
	
	if($javascripts->size);
			$very_last_thing_insert += '<script type="text/javascript">';
			iterate($javascripts, #x);
					$very_last_thing_insert += #x '\r';
			/iterate;
			$very_last_thing_insert += '</script>';
	/if;
	
	//time to include the template
	
	inline($connection_files);
			if(file_exists('/_Site/templates/' $template '.lasso'));
					include('/_Site/templates/' $template '.lasso');
			else;
					include('/_Makerator/templates/' $template '.lasso');
			/if;
	/inline;
	
]